package com.dc.project.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统组织部门表(SysDept)实体类
 *
 * @author zhuangcy
 * @since 2021-06-04 18:16:04
 */
@TableName("sys_dept")
@Data
@ApiModel(value = "系统组织部门表")
public class SysDept implements Serializable {
    private static final long serialVersionUID = -93576961541113851L;
    /**
     * 部门id
     */
    @NotNull(message = "部门id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "dept_id", type = IdType.AUTO)
    @ApiModelProperty(name = "deptId", value = "部门id")
    private Integer deptId;
    /**
     * 父id
     */
    @TableField(value = "parent_id")
    @ApiModelProperty(name = "parentId", value = "父id")
    private Integer parentId;
    /**
     * 部门编码
     */
    @NotNull(message = "部门编码不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "dept_code")
    @ApiModelProperty(name = "deptCode", value = "部门编码")
    private String deptCode;
    /**
     * 部门名称
     */
    @NotNull(message = "部门名称不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    @TableField(value = "dept_name")
    @ApiModelProperty(name = "deptName", value = "部门名称")
    private String deptName;
    /**
     * 祖级列表
     */
    @TableField(value = "ancestors")
    @ApiModelProperty(name = "ancestors", value = "祖级列表")
    private String ancestors;
    /**
     * 负责人
     */
    @TableField(value = "leader")
    @ApiModelProperty(name = "leader", value = "负责人")
    private String leader;
    /**
     * 联系电话
     */
    @TableField(value = "phone")
    @ApiModelProperty(name = "phone", value = "联系电话")
    private String phone;
    /**
     * 邮箱
     */
    @TableField(value = "email")
    @ApiModelProperty(name = "email", value = "邮箱")
    private String email;
    /**
     * 状态（0正常 1停用）
     */
    @TableField(value = "status")
    @ApiModelProperty(name = "status", value = "状态（0正常 1停用）")
    private String status;
    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableField(value = "del_flag")
    @ApiModelProperty(name = "delFlag", value = "删除标志（0代表存在 1代表删除）")
    private String delFlag;
    /**
     * 创建者id
     */
    @TableField(value = "created_id", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdId", value = "创建者id")
    private Integer createdId;
    /**
     * 创建者
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdBy", value = "创建者")
    private String createdBy;
    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdTime", value = "创建时间")
    private Date createdTime;
    /**
     * 更新者id
     */
    @TableField(value = "updated_id", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedId", value = "更新者id")
    private Integer updatedId;
    /**
     * 更新者
     */
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedBy", value = "更新者")
    private String updatedBy;
    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedTime", value = "更新时间")
    private Date updatedTime;


}